1
The Client-Server Programming Model
AI031 Lesson 11
00:00

The Client-Server Programming Model is the foundational architecture for distributed applications. It is not defined by hardware, but by a logical transaction between two processes: a client that initiates a request for a resource, and a server that manages and provides it.

1. The 4-Step Transaction

Every interaction follows a rigid sequence: (1) The client sends a request; (2) The server interprets and manipulates local resources; (3) The server sends a response; (4) The client manipulates the received data (e.g., rendering HTML).

2. Hardware Organization

Communication relies on the Network Adapter, an I/O device. Data travels from the CPU through the I/O Bridge and System Bus to Main Memory. In a web request like http://www.google.com:80, packets traverse these buses to reach the application code.

User: Client/Server Kernel: TCP/IP Hardware I/O Bus (Network Adapter | Disk | Graphics)

3. Protocol Abstraction

Modern applications use Network Byte Order (big-endian) for consistency. Functions like getaddrinfo provide Domain name to IP address mapping while remaining protocol-independent.

main.py
TERMINAL bash — 80x24
> Ready. Click "Run" to execute.
>